//
//  OAuthViewController.swift
//  myWeibobo
//
//  Created by MrWu on 16/4/9.
//  Copyright © 2016年 MrWu. All rights reserved.
//

import UIKit

class OAuthViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        view.backgroundColor = UIColor.whiteColor()
        webview.delegate = self;
    }

    private lazy var webview = UIWebView()

    override func loadView() {
        view = webview;
        title = "登录新浪微博"
        navigationItem.leftBarButtonItem = UIBarButtonItem(title: "关闭", style: UIBarButtonItemStyle.Plain, target: self, action: "closeVC")
        navigationItem.rightBarButtonItem = UIBarButtonItem(title: "自动登录", style: UIBarButtonItemStyle.Plain, target: self, action: <#T##Selector#>)
    }
    @objc private func closeVC() {
        dismissViewControllerAnimated(true, completion: nil)
    }
    
    
    @objc private func autofill() {
        let js = ""
                 "";
        webview.stringByEvaluatingJavaScriptFromString(js)
    }

}

extension OAuthViewController:UIWebViewDelegate {
    
}
